<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <button id="btn">验证</button>
    <div id="box" style="width:300px;height:200px;background:red;"></div>
    <script>
        var box = document.getElementById('box');
        var btn = document.getElementById('btn');

        btn.onclick = function(){
            if(box.style.width == '200px'){
                alert('条件成立')
            }else{
                //当不满足上述条件的时候，执行这里的代码
                alert('条件不成立');
            }
        }

        /*
            <60 不及格
            60 ~ 70 一般
            70~80 良好
            80~优秀
        */

    </script>
</body>
</html>